.saasaparilla
	%h1 Subscription Detail

	.info
		%h2 Subscriber Contact Info
		%p
			= "#{@subscription.first_name} #{@subscription.last_name}"
			%br
			= @subscription.contact_info.email
			%br
			- if @subscription.contact_info.require_billing_address?
				= @subscription.address
				%br
				= "#{@subscription.city}, #{@subscription.state} #{@subscription.zip}"
				%br
			- if @subscription.contact_info.require_phone_number?
				= "#{@subscription.phone_number}"

	.info
		%h2 Subscription Details
		%p
			="Status: "
			= @subscription.status 
			%br
			- if @subscription.no_charge
				Complimentary (no_charge):
				= @subscription.no_charge 
				%br
			= "Balance: "
			= number_to_currency(@subscription.balance)
			%br
			= "Last Invoiced: "
			= @subscription.invoiced_on.to_s(:month_day_year) unless @subscription.invoiced_on.nil?
			%br
			= "Last Transaction Date: "
			= @subscription.last_transaction_date
			%br
			= "Last Transaction Amount: "
			= number_to_currency(@subscription.last_transaction_amount)
			%br
			%br
			= link_to "See all transactions", admin_subscription_transactions_path(@subscription)
	
	.info
		%h2 Actions
		%p
			= link_to "Cancel Subscription", cancel_admin_subscription_path(@subscription), :confirm => "Are you sure you want to cancel this subscription?" unless @subscription.status == "canceled" 
			%br
			- if @subscription.no_charge
				= link_to "Revoke complimentary subscription", toggle_no_charge_admin_subscription_path(@subscription), :confirm => "Are you sure you want to comp this subscription?"
			- else 
				= link_to "Make subscription complimentary", toggle_no_charge_admin_subscription_path(@subscription), :confirm => "Are you sure you want to comp this subscription?"